﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Soft.Service
{

    /// <summary>
    /// 任务描述信息
    /// </summary>
    public sealed class TaskInformation : SoftObject
    {
        public TaskInformation()
        {
            this.StartTime = new TimeSign();
        }

    
        /// <summary>
        /// 开始时间
        /// </summary>
        public TimeSign StartTime
        {
            get
            {
                return this.mStartTime;
            }
            set
            {
                this.mStartTime = (value ?? TimeSign.Empty());
            }
        }


        /// <summary>
        /// 任务重复的模式
        /// </summary>
        public ScheduleRepeatMode RepeatMode { get; set; } = ScheduleRepeatMode.Fix;


        public DateTime BeginTime { get; set; } = DateTime.MinValue;


        /// <summary>
        /// 循环的时间单位
        /// </summary>
        public TimeUnitItem Cycle { get; set; } = TimeUnitItem.Empty;
 

        /// <summary>
        /// 是否允许执行
        /// </summary>
        public bool Enabled { get; set; } = true;

     
        /// <summary>
        /// 是否延迟执行
        /// </summary>
        public bool Delayed { get; set; }

     
        private TimeSign mStartTime;
    }
}
